var ajaxHelper = require("../../utils/ajaxhelp");
const serviceUrl = getApp().globalData.serviceUrl;
let token = wx.getStorageSync('token');

/**分页获取首页数据 */
const GetImgAtachments = (outerid) => {
	token = wx.getStorageSync('token');
	return ajaxHelper.promiseRequst(serviceUrl + "/api/Attachment/GetTAttachments", {}, "GET", {
		outerid: outerid
	})
}
/**删除附件 */
const DelAttachment = (dir) => {
	token = wx.getStorageSync('token');
	return ajaxHelper.promiseRequst(serviceUrl + "/api/Attachment/DelAttachment", {
		'Authorization': 'Bearer ' + token
	}, "GET", {
		dir: dir
	})
}

module.exports = {
	GetImgAtachments,
	DelAttachment
}
